<ion-header>
    <ion-navbar color="orange">
        <ion-title>
            设置付费详情
        </ion-title>
    </ion-navbar>
</ion-header>

<ion-content>
    <div class="ht-f1f1f1 ht-overflow">
        <div padding *ngIf="util.inArray(checkType,'click_pay') != -1 || util.inArray(checkType,'reward') != -1">
            <span *ngIf="paymentInfo['service_rate']>0 || paymentInfo['royalty_rate']>0">平台将收取<span *ngIf="paymentInfo['service_rate']>0">{{paymentInfo['service_rate']*100}}%服务费</span><span *ngIf="paymentInfo['service_rate']>0 && paymentInfo['royalty_rate']>0">和</span><span *ngIf="paymentInfo['royalty_rate']>0">{{paymentInfo['royalty_rate']*100}}%的手续费</span>（<span *ngIf="sendData['reward']">赏金可退，</span>服务费不退）</span>
        </div>

        <!-- 有偿转发 -->
        <div class="ht-overflow ht-background ht-margin-bottom" padding *ngIf="sendData['click_pay']">
            <div class="ht-overflow ht-padding-bottom10">
                <img src="assets/imgs/icon-zf.png" alt="" class="ht-img">
                <span class="ht-span ht-font-15">
                有偿转发<!--(可不选)--><i class="ht-font-12 ht-999">按点击付费，赏金封顶</i>
                </span>
            </div>
            <div class="ht-overflow ht-font-14 ht-999 ip-padding-left ht-line-20">
                <input type="number" class="ip-input ht-10" placeholder="0.00" style="width:50px;background-color:#E8E8E8;" [(ngModel)]="paymentInfo['click_unit_price']" (keyup)="checkMoney($event)">元/每次点击，总赏金
                <input type="number" class="ip-input ht-10" placeholder="0.00" style="width:50px;background-color:#E8E8E8;" [(ngModel)]="paymentInfo['click_amount']" (keyup)="checkMoney($event)">元
            </div>
        </div>
        <!-- 付费查看 -->
        <div class="ht-overflow ht-background ht-margin-bottom" padding *ngIf="sendData['see_pay']">
            <div class="ht-overflow ht-padding-bottom10">
                <img src="assets/imgs/icon-gz.png" alt="" class="ht-img">
                <span class="ht-span ht-font-15">
                    信息收费<!--<i class="ht-font-12 ht-999">查看信息收费</i>-->
                </span>
            </div>
            <div class="ht-overflow ht-font-14 ht-999 ip-padding-left ht-line-20 ht-padding-bottom10">
                <p>每次收费<input type="number" class="ip-input ht-10" style="width:50px;background-color:#E8E8E8;" placeholder="0.00" [(ngModel)]="paymentInfo['see_pay_price']" (keyup)="checkMoney($event)">元,</p>
                <div class="flex ht-relative margin-top-5">
                    <label style="margin:5px 5px 5px 0;">收费开始日期：</label>
                    <ion-datetime style="padding:5px;line-height:29px;background-color:#E8E8E8;opacity: 1;border-radius:5px;" displayFormat="YYYY/MM/DD" placeholder="{{paymentInfo['see_start_time']}}" pickerFormat="YYYY/MM/DD" min="{{paymentInfo['see_start_time']}}"[(ngModel)]="paymentInfo['see_start_time']" cancelText="取消" doneText="确定"></ion-datetime>
                </div>
                <div class="flex ht-relative margin-top-5">
                    <label style="margin:5px 5px 5px 0;">收费截止日期：</label>
                    <ion-datetime style="padding:5px;line-height:29px;background-color:#E8E8E8;opacity: 1;border-radius:5px;" displayFormat="YYYY/MM/DD" placeholder="{{paymentInfo['see_end_time']}}" pickerFormat="YYYY/MM/DD" max="{{paymentInfo['see_end_time']}}" [(ngModel)]="paymentInfo['see_end_time']" cancelText="取消" doneText="确定"></ion-datetime>
                </div>
            </div>
            <!--<div class="ht-overflowht-font-12 text-red ip-padding-left ht-padding-bottom10">-->
                <!--<span *ngIf="paymentInfo['service_rate']>0 || paymentInfo['royalty_rate']>0">平台将收取<span *ngIf="paymentInfo['royalty_rate']>0">{{paymentInfo['service_rate']*100}}%的服务费</span><span *ngIf="paymentInfo['service_rate']>0 && paymentInfo['royalty_rate']>0">和</span><span *ngIf="paymentInfo['see_rate']>0">{{paymentInfo['see_rate']*100}}%手续费</span></span>-->
            <!--</div>-->
            <div class="ht-overflowht-font-12 ht-font-f29603 ip-padding-left ht-padding-bottom10">
                付费后，再次查看免费(收费期最长不得超过90天)
            </div>

        </div>
        <!-- 保证金 -->
        <!--<div class="ht-overflow ht-background ht-margin-bottom" padding>-->
            <!--<div class="ht-overflow ht-padding-bottom10">-->
                <!--<img src="assets/imgs/icon-bz.png" alt="" class="ht-img">-->
                <!--<span class="ht-span ht-font-15">-->
                    <!--保证金(可不选)<i class="ht-font-12 ht-999">按点击付费，赏金封顶</i>-->
                  <!--</span>-->
            <!--</div>-->
            <!--<div class="ht-overflow ht-font-14 ht-999 ip-padding-left ht-line-20">-->
                <!--<input type="text" class="ip-input ht-20" placeholder="自行填写">元-->
            <!--</div>-->
        <!--</div>-->
        <!-- 悬赏 -->
        <div class="ht-overflow ht-background ht-margin-bottom" padding *ngIf="sendData['reward']">
            <div class="ht-overflow" padding-bottom>
                <img src="assets/imgs/icon-ipxs.png" alt="" class="ht-img">
                <span class="ht-span ht-font-15">
                    悬赏<!--(可不选)-->
                </span>
            </div>
            <div class="ht-overflow ht-font-14 ht-999 ht-line-20" padding-left padding-right>
                <div class="ht-overflow ht-border-bottom ht-padding-bottom10">
                    赏金<input type="number" class="ip-input ht-25" placeholder="0.00" style="width:50px;background-color:#E8E8E8;" [(ngModel)]="paymentInfo['reward_price']" (keyup)="checkMoney($event)">元
                </div>
                <div class="flex ht-relative margin-top-5">
                    <label style="margin:5px 5px 5px 0;">报名截止日期：</label>
                    <ion-datetime style="padding:5px;line-height:29px;background-color:#E8E8E8;opacity: 1;border-radius:5px;" displayFormat="YYYY/MM/DD" placeholder="{{paymentInfo['reward_end_time']}}" pickerFormat="YYYY/MM/DD" [(ngModel)]="paymentInfo['reward_end_time']" cancelText="取消" doneText="确定"></ion-datetime>
                </div>
                <!--<div class="ht-padding-bottom10 ht-overflow">-->
                    <!--<span class="ht-line-40 ht-333 ht-font-14">任务详情</span>-->
                    <!--<textarea rows="3" placeholder="自动编写信息内容（发布人核对）"></textarea>-->
                <!--</div>-->

            </div>
        </div>
        <!-- 结算清单 -->
        <div class="ht-overflow" *ngIf="sendData['reward'] || sendData['click_pay']">
            <div class="ht-overflow ht-f1f1f1 padding-top-5 padding-bottom-5">
              <span class="ht-font-15" padding-left padding-right>
               <span class="text-bold ht-font-16">结算清单</span>
               <!--<i class="ht-font-12 ht-999">(平台收取{{paymentInfo['service_rate']*100}}%服务费，{{paymentInfo['see_rate']*100}}%手续费，赏金与手续费可退，服务费不退)</i>-->
              </span>
            </div>
            <div class="ht-background">
                <!-- 1 -->
                <div class="ht-border-bottom" *ngIf="sendData['click_pay']">
                    <div class="ht-90 ht-auto ht-padding-tb ht-overflow">
                        <div class="">
                            <span class="ht-100 ht-font-14 ht-333 ht-inline-block">有偿转发
                                <span *ngIf="paymentInfo['service_rate']>0 || paymentInfo['royalty_rate']>0">（含<span *ngIf="paymentInfo['service_rate']>0">{{paymentInfo['service_rate']*100}}%服务费</span><span *ngIf="paymentInfo['service_rate']>0 && paymentInfo['royalty_rate']>0">和</span><span *ngIf="paymentInfo['royalty_rate']>0">{{paymentInfo['royalty_rate']*100}}%的手续费</span>）</span>
                            </span>
                        </div>
                        <div class="ht-text-right ht-font-14 ht-ff4b3d ht-line-40">
                            ￥{{(paymentInfo['click_amount']*(1+paymentInfo['service_rate']+paymentInfo['royalty_rate'])).toFixed(2)}}
                        </div>
                    </div>
                </div>
                <!-- 2 -->
                <div class="ht-border-bottom" *ngIf="sendData['reward']">
                    <div class="ht-90 ht-auto ht-padding-tb ht-overflow">
                        <div class="">
                            <span class="ht-100 ht-font-14 ht-333 ht-inline-block">
                                悬赏金额
                                <span *ngIf="paymentInfo['service_rate']>0 || paymentInfo['royalty_rate']>0">（含<span *ngIf="paymentInfo['service_rate']>0">{{paymentInfo['service_rate']*100}}%服务费</span><span *ngIf="paymentInfo['service_rate']>0 && paymentInfo['royalty_rate']>0">和</span><span *ngIf="paymentInfo['royalty_rate']>0">{{paymentInfo['royalty_rate']*100}}%的手续费</span>）</span>
                            </span>
                        </div>
                        <div class="ht-text-right ht-font-14 ht-ff4b3d ht-line-40">
                            ￥{{(paymentInfo['reward_price']*(1+paymentInfo['service_rate']+paymentInfo['royalty_rate'])).toFixed(2)}}
                        </div>
                    </div>
                </div>
                <!-- 3 -->
            </div>
        </div>
    </div>
</ion-content>
<ion-footer>
    <ion-toolbar>
        <div class="ht-50 ht-float-left ht-line-50 ht-text-center">
            <!-- 合计：<i class="ht-ff4b3d">￥{{(((paymentInfo['click_amount'])*100+(paymentInfo['reward_price'])*100)*(1+paymentInfo['service_rate']+paymentInfo['royalty_rate'])/100).toFixed(2)}}</i> -->
            合计：<i class="ht-ff4b3d">￥{{((paymentInfo['click_amount']*(1+paymentInfo['service_rate']+paymentInfo['royalty_rate'])) + (paymentInfo['reward_price']*(1+paymentInfo['service_rate']+paymentInfo['royalty_rate']))).toFixed(2)}}</i>
        </div>
        <div class="ht-50 ht-float-left ht-line-50 ht-text-center ht-fff ht-f29603" (click)="submitData()">
           <span *ngIf="util.inArray(checkType,'click_pay') != -1 || util.inArray(checkType,'reward') != -1">
            支付并发布
           </span>
           <span *ngIf="util.inArray(checkType,'click_pay') == -1 && util.inArray(checkType,'reward') == -1">发布</span> 
        </div>
    </ion-toolbar>
</ion-footer>